import http from '@/utils/http';

const stockInventoryOrder = {
  //库存盘点单视图
  query(params: any) {
    let url = '/StockInventoryOrder/Query';
    return http.post(url, params);
  },
  //库存盘点单详情
  detail(id: Number) {
    let url = '/StockInventoryOrder/Detail';
    let params = { id: id };
    return http.get(url, params);
  },
  //库存盘点单保存
  save(params: Object) {
    let url = '/StockInventoryOrder/Save';
    return http.post(url, params);
  },
  //库存盘点单审核
  check(ids: Array<Number>) {
    let url = '/StockInventoryOrder/Check';
    const params = { ids };
    return http.post(url, params);
  },
  //库存盘点单弃审
  unCheck(ids: Array<Number>) {
    let url = '/StockInventoryOrder/UNCheck';
    const params = { ids };
    return http.post(url, params);
  },
  //库存盘点单锁定
  lock(ids: Array<Number>) {
    let url = '/StockInventoryOrder/Lock';
    const params = { ids };
    return http.post(url, params);
  },
  //库存盘点单取消
  cancel(ids: Array<Number>) {
    let url = '/StockInventoryOrder/Cancel';
    const params = { ids };
    return http.post(url, params);
  },
  //导出
  export(params: Object) {
    let url = '/StockInventoryOrder/Export';
    return http.postDownload(url, params);
  },
};
export default stockInventoryOrder;
